Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement matrix inversion #40

Merged
merged 1 commit into from
Jun 23, 2024
Merged

Implement matrix inversion #40

merged 1 commit into from
Jun 23, 2024

Conversation

frostburn
Copy link
Member

No description provided.

@frostburn frostburn force-pushed the matrix-inverse branch 3 times, most recently from 53e4d38 to 327aa78 Compare June 22, 2024 17:22
src/basis.ts Outdated
for (let y = x + 1; y < height; ++y) {
const s = matrix[y][x] * d;
if (s) {
matrix[y] = matrix[y].map((a, i) => a - s * (matrix[x][i] ?? 0));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to map entries that are not used later here.

@frostburn frostburn force-pushed the matrix-inverse branch 2 times, most recently from ff3886b to 28f7389 Compare June 23, 2024 04:25
@frostburn
Copy link
Member Author

Check that naïve det agrees with the existence of an inverse.

Implement matmul and eye to verify implementation.
Implement det.
Implement transpose.
@frostburn frostburn merged commit 8d1dde2 into main Jun 23, 2024
1 check passed
@frostburn frostburn deleted the matrix-inverse branch June 23, 2024 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant